<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ include file="/include/taglibs.jsp" %>
<html>
<head>
	<%@include file="/include/header.html" %>
	<script type="text/javascript" src="${ctx}/appjs/tenant/user/user.js"></script>
</head>

<script type="text/javascript">
	$('#topLink', window.parent.document).html(function (i, origText) {
		return'<ol class="breadcrumb">' +
				'<li class="breadcrumb-item">' +
				'<a href="">系统用户管理</a>' +
				'</li>' +
				'<li class="breadcrumb-item">' +
				'<a>用户列表</a>' +
				'</li>' +
				'<li class="breadcrumb-item">' +
				'<strong>编辑用户信息</strong>' +
				'</li>' +
				'<li class="breadcrumb-item">' +
				'<a href="javascript:window.history.back()"><i class="fa fa-times"></i> 返回</a>' +
				'</li>' +
				'</ol>';
	});
</script>

<body class="gray-bg">
<div class="wrapper wrapper-content ">
	<div class="row">
		<div class="col-sm-12">
			<div class="ibox float-e-margins">
				<div class="ibox-title">
					<div class="columns pull-left">
						<h5 class="font-bold">用户信息</h5>
					</div>
					<div class="ibox-tools">
						<a class="close-link">
							<i class="fa fa-times"></i>
						</a>
					</div>
				</div>
				<div class="ibox-content" id="exampleTable">

					<form class="form-horizontal m-t " id="frmUser">
						<input type="text" class="form-control" id="tenantUserId" name="tenantUserId" value="${tenantUser.tenantUserId}" hidden>
						<div class="form-group row">

							<label class="col-sm-3 col-form-label text-right">登录账号：</label>
							<div class="col-sm-8">
								<input type="text" class="form-control" id="loginName" name="loginName" value="${tenantUser.loginName}" readonly>

							</div>
						</div>

						<div class="form-group row ">
							<label class="col-sm-3 col-form-label text-right">用户名称：</label>
							<div class="col-sm-8">
								<input type="text" class="form-control" name="realName" id="realName" value="${tenantUser.realName}">
							</div>
						</div>

						<div class="form-group row">
							<label class="col-sm-3 col-form-label text-right">手机号：</label>
							<div class="col-sm-8">
								<input type="text" class="form-control" name="mobile" id="mobile" value="${tenantUser.mobile}">
							</div>
						</div>

						<div class="form-group row">
							<label class="col-sm-3 col-form-label text-right">身份证号：</label>
							<div class="col-sm-8">
								<input type="text" class="form-control" name="citizenshipNumber" id="citizenshipNumber" value="${tenantUser.citizenshipNumber}" >
							</div>
						</div>
						<div class="form-group row">
							<label class="col-sm-3 col-form-label text-right">密码：</label>
							<div class="col-sm-8">
								<input type="password" class="form-control" name="password" id="password" value="${tenantUser.password}">
							</div>
						</div>

						<div class="form-group row">
							<label class="col-sm-3 col-form-label text-right">性别:</label>
							<div class="col-sm-8">
								<select name="userSex" id="userSex"
										class="form-control chosen-select"
										style="width: 100%">
									<option value="0" ${tenantUser.userSex == "0"?'selected':''}>男</option>
									<option value="0" ${tenantUser.userSex == "1"?'selected':''}>女</option>
								</select>
							</div>
						</div>
						<div class="form-group row">
							<label class="col-sm-3 col-form-label text-right">状态:</label>
							<div class="col-sm-8">
								<label class="radio-inline">
									<input type="radio" name="status" value="0" ${tenantUser.status == "0"?'checked':''}/>正常
								</label>
								<label class="radio-inline">
									<input type="radio" name="status" value="1" ${tenantUser.status == "1"?'checked':''}/>冻结
								</label>
							</div>
						</div>
						<div class="form-group row">
							<label class="col-sm-3 col-form-label text-right">角色:</label>
							<div class="col-sm-8">
								<select name="tenantRoleId" id="tenantRoleId"
										class="form-control chosen-select"
										style="width: 100%">
									<option value="" selected="selected">--请选择--</option>
									<c:forEach items="${roles}" var="bean">
										<option value="${bean.tenantRoleId}" ${bean.tenantRoleId == tenantUser.tenantRoleId?'selected':''}>${bean.roleName}
										</option>
									</c:forEach>
								</select>
							</div>
						</div>
						<div class="form-group row">
							<label class="col-sm-3 col-form-label text-right">创建人：</label>
							<div class="col-sm-8">
								<input type="text" class="form-control" name="createdBy" id="createdBy" value="${tenantUser.createdBy}" readonly>
							</div>
						</div>
						<div class="form-group row">
							<label class="col-sm-3 col-form-label text-right">创建时间：</label>
							<div class="col-sm-8">
								<input type="text" class="form-control" name="createdTime" id="createdTime" value="<fmt:formatDate value="${tenantUser.createdTime}" pattern="yyyy-MM-dd HH:mm:ss" />" readonly>
							</div>
						</div>
						<div class="form-group row">
							<label class="col-sm-3 col-form-label text-right">最近登陆时间：</label>
							<div class="col-sm-8">
								<input type="text" class="form-control" name="lastLoginTime" id="lastLoginTime" value="<fmt:formatDate value="${tenantUser.lastLoginTime}" pattern="yyyy-MM-dd HH:mm:ss" />" readonly>
							</div>
						</div>
						<div class="form-group" style="margin-top: 15px !important;">
							<div class="col-sm-4 col-sm-offset-8 text-right">
								<button type="submit" class="btn btn-success" >提交</button>
							</div>
						</div>
					</form>

				</div>
			</div>
		</div>
	</div>
</div>
<script>
	editUser.init();
</script>
</body>
</html>
